﻿
    using Chain.BLL;
    using System;
    using System.Data;
    using System.Text.RegularExpressions;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public partial class historyrecharge : Page
    {
        private MemRecharge MemRechargeBll = new MemRecharge();


        protected string GetTypeStr(object objRechargeType)
        {
            switch (Convert.ToInt32(objRechargeType))
            {
                case 1:
                    return "初始充值";

                case 2:
                    return "现金充值";

                case 3:
                    return "银联充值";

                case 4:
                    return "网上充值";
                case 21:
                    return "分享奖励";
                case 24:
                    return "零钱提现";
            }
            return "未知类型";
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+$"))
            {
                int MemID = Convert.ToInt32(base.Request["uid"]);
                DataTable dt = this.MemRechargeBll.GetList("RechargeIsApprove=1 and RechargeMemID=" + MemID + " order by RechargeID desc").Tables[0];
                this.rptHistoryrecharge.DataSource = dt;
                this.rptHistoryrecharge.DataBind();
                if (dt.Rows.Count == 0)
                {
                    this.msg.Style.Add("display", "");
                }
            }
        }
    }


